﻿using FluentValidation;
using FSH.Modules.Identity.Contracts.v1.Users.ForgotPassword;

namespace FSH.Modules.Identity.Features.v1.Users.ForgotPassword;

public class ForgotPasswordCommandValidator : AbstractValidator<ForgotPasswordCommand>
{
    public ForgotPasswordCommandValidator()
    {
        RuleFor(p => p.Email).Cascade(CascadeMode.Stop)
            .NotEmpty()
            .EmailAddress();
    }
}